package br.com.projeto.databases;

import br.com.projeto.hibernatedao.CategoryHibernateDAO;
import br.com.projeto.hibernatedao.ClientHibernateDAO;
import br.com.projeto.hibernatedao.ProductHibernateDAO;
import br.com.projeto.hibernatedao.UserHibernateDAO;

public class DAOFactory {
	
	public static ClientHibernateDAO clientDAO(){
		ClientHibernateDAO clientDAOHibernate = new ClientHibernateDAO();
		clientDAOHibernate.setSession(HibernateConfiguration.getSession().getCurrentSession());
		return clientDAOHibernate;
	}
	
	public static UserHibernateDAO userDao(){
		UserHibernateDAO userHibernateDAO= new UserHibernateDAO();
		userHibernateDAO.setSession(HibernateConfiguration.getSession().getCurrentSession());
		return userHibernateDAO;
	}
	
	public static ProductHibernateDAO productDao(){
		ProductHibernateDAO productHibernateDAO = new ProductHibernateDAO();
		productHibernateDAO.setSession(HibernateConfiguration.getSession().getCurrentSession());
		return productHibernateDAO;
	}
	
	public static CategoryHibernateDAO categoryDao(){
		CategoryHibernateDAO categoryHibernateDAO = new CategoryHibernateDAO();
		categoryHibernateDAO.setSession(HibernateConfiguration.getSession().getCurrentSession());
		return categoryHibernateDAO;
	}

}
